import Vue from 'vue'
import VueRouter from 'vue-router'
import Reg from '@/views/Reg/Reg.vue'
import Login from '@/views/Login/Login.vue'
// import { directive } from 'vue/types/umd'
import Main from '@/views/Main/Main.vue'

Vue.use(VueRouter)

// 路由的配置规则
const routes = [
  //路由重定向
{ path: '/reg', component: Reg },
{ path: '/login', component: Login },
{ path: '/', component: Main }
]

const router = new VueRouter({
  routes
})

export default router
